package edu.sctu.wujiayi.month06.day20150628.javaText;

import java.io.*;

/**
 * Created by user11 on 2015/6/28.
 */
public class SeraiPracticel {
    public  static void serail(JsonValueOne jsonValue,String path ) throws IOException {

        ObjectOutputStream inputStream = new ObjectOutputStream(new FileOutputStream(new File(path)));


//        JsonValueOne jsonValue = new JsonValueOne();

        inputStream.writeObject(jsonValue);

    }

    public static JsonValueOne opSerial() throws IOException, ClassNotFoundException {

        ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream(new File("D://Json//Json.txt")));

        System.out.println(objectInputStream);
        JsonValueOne jsonValueOne = (JsonValueOne) objectInputStream.readObject();
        return jsonValueOne;
    }

}
